jQuery(document).ready(function(){
	var slides = new Array();
	var parameters = new Array();
	parameters['image'] = 'images/slider/bgslide1.jpg';
	parameters['pause'] = 8000;
	parameters['resize'] = true;
	parameters['particles'] = true;
	parameters['lens_flare'] = true;
	parameters['color'] = 'white';
	slides[0] = parameters;
	var parameters = new Array();
	parameters['image'] = 'images/slider/bgslide2.jpg';
	parameters['pause'] = 8000;
	parameters['resize'] = true;
	parameters['particles'] = true;
	parameters['lens_flare'] = true;
	parameters['color'] = 'blue';
	slides[1] = parameters;
	var parameters = new Array();
	parameters['image'] = 'images/slider/bgslide3.jpg';
	parameters['pause'] = 5000;
	parameters['resize'] = true;
	parameters['particles'] = true;
	parameters['lens_flare'] = false;
	parameters['color'] = '';
	slides[2] = parameters;
	
	if(jQuery('#hp_slider').length != 0){
		jQuery('#hp_slider').hpSlider({'slides': slides})
	}
	jQuery('#black_layer').animate({'opacity':'0'},1000);
	
	if(jQuery('#bg_slider').length != 0){
		jQuery('#bg_slider').bgSlider({'speed' : 1000,'pause' : 4000});
	}
	if(jQuery.browser.msie){
		if(jQuery.browser.version >= 9){
			Cufon.replace('h1', {color: '-linear-gradient(rgba(255,255,255,1), rgba(70,70,70,1))'});
		}
	}else{
		Cufon.replace('h1', {color: '-linear-gradient(rgba(255,255,255,1), rgba(70,70,70,1))'});
	}
		
	jQuery('.search .input-button').hover(function(){
		jQuery(this).attr('src','images/search_button-hover.png');},function(){jQuery(this).attr('src','images/search_button.png');
	});
	if(jQuery('#twitter').length != 0){
		jQuery("#twitter").getTwitter({userName: 'themeprince',numTweets: '3',loaderText: "Loading..."});
	}
	if(jQuery('.fancybox').length != 0){
		jQuery('.fancybox').fancybox();
	}
	if(jQuery('.fancybox_iframe').length != 0){
		jQuery('.fancybox_iframe').fancybox({'width': '75%','height': '75%','autoScale'     : false,'type': 'iframe'});
	}
	if(jQuery('.fancybox_embed').length != 0){
		jQuery('.fancybox_embed').fancybox({'hideOnContentClick': true});
	}
	if(jQuery('.fancybox_flv').length != 0){
		var vid_id = jQuery('.fancybox_flv').attr('href');
		jQuery('.fancybox_flv').fancybox({'href':'swf/player_flv_maxi.swf','autoScale'     : true,'type': 'swf','swf': {'FlashVars': 'showvolume=1&amp;buttonovercolor=d3aa66&amp;sliderovercolor=d3aa66&amp;loadingcolor=ffffff&amp;autoplay=1&amp;flv='+vid_id}});
	}
	if(!jQuery.browser.msie || jQuery.browser.version > 8){
		jQuery(function(){
			if(jQuery('#blog-small,#blog-large,.portfolio,.portfolio-sb, .gallery').length != 0){
				jQuery('#blog-small,#blog-large,.portfolio,.portfolio-sb, .gallery').preloader();
			}
		});
	}
	if(jQuery('#tabs').length != 0){
		jQuery('#tabs').tabs({fx: [{opacity:'toggle', duration:'normal'},                        {opacity:'toggle', duration:'fast'}]})
	}
	jQuery('.toggle_box').hide();
	jQuery('.toggle').click(function(){
		jQuery(this).next('.toggle_box').slideToggle('slow');
		return false;
	});
	if(jQuery('#carousel').length != 0){
		jQuery('#carousel').tinycarousel({start: 2});
	}
});
					
					
					
					
					
					
					
					
					
					
					